import {
	http
} from 'uview-plus';
const user = {
	namespaced: true,
	state: {
		userInfo: {},
	},
	mutations: {
		setUserInfo(state, obj) {
			state.userInfo = obj
		},
	},
	actions: {
		async getUserInfo({
			commit
		}) {
			const res = await http.get('/wx/customer/findByPhone');
			commit('setUserInfo', res.data)
			uni.setStorageSync('userInfo', res.data)
		},
	}
}
export default user